
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>4.抽取器 · GitBook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.2">
        
        
        
    
    <link rel="stylesheet" href="gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="4chou-qu-qi/41sipsoup.html" />
    
    
    <link rel="prev" href="3pa-chong-kong-zhi.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="./">
            
                <a href="./">
            
                    
                    序言
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="chapter1.html">
            
                <a href="chapter1.html">
            
                    
                    1. 快速入门
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="2ji-ben-zu-jian.html">
            
                <a href="2ji-ben-zu-jian.html">
            
                    
                    2.基本组件
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="2ji-ben-zu-jian/processor.html">
            
                <a href="2ji-ben-zu-jian/processor.html">
            
                    
                    2.1 Processor
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="2ji-ben-zu-jian/22-pipline.html">
            
                <a href="2ji-ben-zu-jian/22-pipline.html">
            
                    
                    2.2 Pipline
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3" data-path="2ji-ben-zu-jian/23-sessionpool.html">
            
                <a href="2ji-ben-zu-jian/23-sessionpool.html">
            
                    
                    2.3 SessionPool
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="3pa-chong-kong-zhi.html">
            
                <a href="3pa-chong-kong-zhi.html">
            
                    
                    3.爬虫控制
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.5" data-path="4chou-qu-qi.html">
            
                <a href="4chou-qu-qi.html">
            
                    
                    4.抽取器
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" data-path="4chou-qu-qi/41sipsoup.html">
            
                <a href="4chou-qu-qi/41sipsoup.html">
            
                    
                    4.1SipSoup
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2" data-path="4chou-qu-qi/42tableevaluator.html">
            
                <a href="4chou-qu-qi/42tableevaluator.html">
            
                    
                    4.2TableEvaluator
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="5zhong-zi-guan-li-qi.html">
            
                <a href="5zhong-zi-guan-li-qi.html">
            
                    
                    5.种子管理器
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="6shi-jian-xun-huan.html">
            
                <a href="6shi-jian-xun-huan.html">
            
                    
                    6.事件循环
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.1" data-path="6shi-jian-xun-huan/61-eventloopgong-zuo-ji-zhi.html">
            
                <a href="6shi-jian-xun-huan/61-eventloopgong-zuo-ji-zhi.html">
            
                    
                    6.1 eventLoop工作机制
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2" data-path="6shi-jian-xun-huan/62zi-dong-shi-jian.html">
            
                <a href="6shi-jian-xun-huan/62zi-dong-shi-jian.html">
            
                    
                    6.2 自动事件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3" data-path="6shi-jian-xun-huan/63delayevent.html">
            
                <a href="6shi-jian-xun-huan/63delayevent.html">
            
                    
                    6.3 延时事件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.4" data-path="6shi-jian-xun-huan/64classScanner.html">
            
                <a href="6shi-jian-xun-huan/64classScanner.html">
            
                    
                    6.4 classScanner
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="." >4.抽取器</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <p>&#x548C;&#x5176;&#x4ED6;&#x722C;&#x866B;&#x6846;&#x67B6;&#x4E00;&#x6837;&#xFF0C;VS&#x4E5F;&#x5B9E;&#x73B0;&#x4E86;&#x81EA;&#x5DF1;&#x5185;&#x7F6E;&#x7684;&#x62BD;&#x53D6;&#x5668;&#x5C01;&#x88C5;&#xFF0C;&#x8BB2;&#x9053;&#x7406;&#x6BCF;&#x4E2A;&#x4EBA;&#x8BBE;&#x8BA1;&#x8FD9;&#x4E2A;&#x6A21;&#x5757;&#x7684;&#x65F6;&#x5019;&#x90FD;&#x8BF4;&#x81EA;&#x5DF1;&#x7684;&#x662F;&#x6700;&#x597D;&#x7684;&#x3002;&#x6211;&#x4E5F;&#x4E00;&#x6837;&#xFF0C;&#x6211;&#x89C9;&#x5F97;&#x6211;&#x8BBE;&#x8BA1;&#x7684;&#x62BD;&#x53D6;&#x5668;&#x662F;&#x76EE;&#x524D;&#x6211;&#x89C1;&#x5230;&#x8FC7;&#x7684;&#x6700;&#x597D;&#x7684;&#x3002;VS&#x5728;&#x6570;&#x636E;&#x62BD;&#x53D6;&#x4E0A;&#x9762;&#x505A;&#x4E86;&#x4E24;&#x4E2A;&#x5C1D;&#x8BD5;&#xFF0C;&#x5206;&#x522B;&#x662F;SipSoup&#x548C;TableEvaluator&#x3002;</p>
<p>SipSoup&#x662F;xpath&#x7684;&#x5B9E;&#x73B0;&#xFF0C;&#x540C;&#x6837;&#x7684;&#x4ED6;&#x4E5F;&#x662F;&#x5728;Jsoup&#x4E0A;&#x9762;&#x5B9E;&#x73B0;&#x4E86;Xpath&#x3002;&#x53EF;&#x80FD;&#x4E0D;&#x5C11;&#x670B;&#x53CB;&#x60F3;&#x8981;&#x95EE;&#x548C;Xsoup&#x6216;&#x8005;JsoupXpath&#x6709;&#x4EC0;&#x4E48;&#x533A;&#x522B;&#xFF0C;&#x8BB2;&#x771F;&#x5982;&#x679C;&#x4ED6;&#x4EEC;&#x7684;&#x6BD4;&#x8F83;&#x597D;&#x7528;&#x6211;&#x5E76;&#x4E0D;&#x4F1A;&#x81EA;&#x5DF1;&#x8BBE;&#x8BA1;&#x4E00;&#x5957;&#x3002;&#x6765;&#x4E00;&#x4E2A;&#x5BA2;&#x89C2;&#x8BC4;&#x4EF7;&#x5427;&#x3002;XSoup&#x662F;&#x9EC4;&#x5927;&#x5927;&#x7B2C;&#x4E00;&#x6B21;&#x57FA;&#x4E8E;JSoup&#x5BF9;Xpath&#x5B9E;&#x73B0;&#x7684;&#x5C1D;&#x8BD5;&#xFF08;&#x6211;&#x770B;&#x5230;&#x662F;&#x7B2C;&#x4E00;&#x6B21;&#xFF09;&#x3002;&#x4E24;&#x5E74;&#x524D;&#x6211;&#x5927;&#x4E09;&#xFF0C;&#x5728;&#x516C;&#x53F8;&#x5B9E;&#x4E60;&#xFF0C;&#x521A;&#x521A;&#x63A5;&#x89E6;&#x722C;&#x866B;&#xFF0C;&#x5BF9;&#x9EC4;&#x5927;&#x5927;&#x7684;XSoup&#x7092;&#x9E21;&#x5D07;&#x62DC;&#xFF0C;&#x66FE;&#x7ECF;&#x5728;&#x516C;&#x53F8;&#x5206;&#x4EAB;&#x8FC7;XSoup&#xFF0C;&#x5F53;&#x65F6;&#x5C31;&#x60F3;&#x770B;&#x770B;&#x6E90;&#x7801;&#xFF0C;&#x4E0D;&#x8FC7;&#x540E;&#x6765;&#x7531;&#x4E8E;&#x6280;&#x672F;&#x8DEF;&#x7EBF;&#x53D8;&#x4E86;&#xFF0C;&#x5F88;&#x4E45;&#x6CA1;&#x6709;&#x641E;&#x722C;&#x866B;&#x4E86;&#x3002;&#x7136;&#x540E;&#x73B0;&#x5728;&#x770B;&#x6765;&#xFF0C;XSoup&#x662F;&#x8D70;&#x4E86;&#x4E00;&#x6761;&#x4E0D;&#x5F52;&#x8DEF;&#xFF0C;XSoup&#x7684;&#x6280;&#x672F;&#x8DEF;&#x7EBF;&#x5B58;&#x5728;&#x74F6;&#x9888;&#xFF0C;&#x4ED6;&#x7684;&#x62BD;&#x53D6;&#x6A21;&#x578B;&#x5B8C;&#x5168;&#x6A21;&#x4EFF;Jsoup&#x7684;css query&#x5B9E;&#x73B0;&#xFF0C;&#x4F46;&#x662F;css query&#x7684;&#x62BD;&#x53D6;&#x6A21;&#x578B;&#x5E76;&#x4E0D;&#x80FD;&#x5B9E;&#x73B0;Xpath&#x7684;&#x8F74;&#x51FD;&#x6570;&#xFF0C;&#x7406;&#x8BBA;&#x5C31;&#x662F;JSoup&#x7684;css query&#x6A21;&#x578B;&#x662F;&#x6709;&#x5B50;&#x5B59;&#x5230;&#x7956;&#x5148;&#x6765;&#x5B9E;&#x73B0;&#xFF0C;&#x4EBA;&#x7C7B;&#x7684;&#x4E60;&#x60EF;&#x662F;&#x7956;&#x5148;&#x5230;&#x5B50;&#x5B59;&#x3002;&#x8FD9;&#x5C31;&#x5BFC;&#x81F4;&#x57FA;&#x4E8E;css query&#x6A21;&#x578B;&#x5B9E;&#x73B0;xpath&#xFF0C;&#x5FC5;&#x987B;&#x5BF9;xpath&#x62BD;&#x53D6;&#x5668;&#x9006;&#x5411;&#x5EFA;&#x6A21;&#xFF08;&#x53CD;&#x4EBA;&#x7C7B;&#x7684;&#x601D;&#x7EF4;&#xFF09;&#xFF0C;&#x540C;&#x6837;&#x56E0;&#x4E3A;&#x8FD9;&#x4E2A;&#x539F;&#x56E0;&#xFF0C;&#x4E0D;&#x53EF;&#x80FD;&#x8DDF;&#x8FDB;&#x51FD;&#x6570;&#x7684;&#x8F93;&#x51FA;&#x8BA1;&#x7B97;&#x51FD;&#x6570;&#x7684;&#x8F93;&#x5165;&#xFF0C;&#x6240;&#x4EE5;XSoup&#x662F;&#x4E0D;&#x53EF;&#x80FD;&#x5728;&#x73B0;&#x6709;&#x7684;&#x6A21;&#x578B;&#x7ED3;&#x6784;&#x4E0A;&#x5B9E;&#x73B0;&#x51FD;&#x6570;&#x7684;&#x9006;&#x5411;&#x6A21;&#x578B;&#xFF0C;&#x4E5F;&#x5C31;&#x4E0D;&#x53EF;&#x80FD;&#x5B9E;&#x73B0;&#x8F74;&#x51FD;&#x6570;&#x4E86;&#x3002;&#x5C31;&#x7B97;&#x4E0D;&#x5B9E;&#x73B0;&#x8F74;&#xFF0C;XSoup&#x7684;&#x529F;&#x80FD;&#x6269;&#x5C55;&#x4E5F;&#x662F;&#x975E;&#x5E38;&#x9EBB;&#x70E6;&#x3002;&#x5F53;&#x524D;&#xFF0C;&#x5BF9;&#x4E8E;XSoup&#x652F;&#x6301;&#x7684;&#x8BED;&#x6CD5;&#xFF0C;&#x5927;&#x591A;&#x6570;&#x573A;&#x666F;&#x4ED6;&#x7684;&#x6027;&#x80FD;&#x5E94;&#x8BE5;&#x4F1A;&#x4F18;&#x4E8E;SipSoup&#xFF0C;&#x4E0D;&#x77E5;&#x9053;&#x8FD9;&#x662F;&#x4E0D;&#x662F;JSoup&#x4F5C;&#x8005;&#x5F53;&#x65F6;&#x601D;&#x8003;&#x7684;&#x65B9;&#x5F0F;</p>
<p>&#x5BF9;&#x4E8E;JsoupXpath&#x5462;&#xFF0C;&#x8FD9;&#x8FD8;&#x662F;&#x4E00;&#x4E2A;&#x4E0D;&#x9519;&#x7684;&#x9879;&#x76EE;&#xFF0C;SipSoup&#x672C;&#x8EAB;&#x4E5F;&#x662F;&#x57FA;&#x4E8E;JSoupXpath&#x91CD;&#x6784;&#x800C;&#x6765;&#xFF0C;&#x4F46;&#x662F;JSoupXpath&#x4EE3;&#x7801;&#x7ED3;&#x6784;&#x786E;&#x5B9E;&#x9700;&#x8981;&#x6574;&#x7406;&#x4E00;&#x4E0B;&#xFF0C;&#x5173;&#x4E8E;&#x62BD;&#x53D6;&#x5668;&#x6A21;&#x5757;&#xFF0C;&#x90A3;&#x51E0;&#x4E2A;&#x5927;&#x5FAA;&#x73AF;&#x3002;&#x5173;&#x4E8E;&#x8C13;&#x8BED;&#x6A21;&#x5757;&#x3002;&#x8FD8;&#x6709;&#x5C31;&#x662F;&#x5728;&#x8FD0;&#x884C;&#x65F6;&#x62A5;&#x9519;&#xFF0C;&#x7F16;&#x8BD1;&#x4E0D;&#x62A5;&#x9519;&#xFF0C;&#x5FEB;&#x901F;&#x5931;&#x8D25;&#x539F;&#x5219;&#x554A;&#x3002;&#x666E;&#x901A;&#x7528;&#x6CD5;&#xFF0C;SipSoup&#x548C;JsoupXpath&#x770B;&#x4E0D;&#x51FA;&#x5927;&#x7684;&#x5DEE;&#x522B;&#xFF0C;&#x4F46;&#x662F;&#x5728;&#x4F60;&#x53D1;&#x73B0;&#x60F3;&#x5B9E;&#x73B0;&#x67D0;&#x4E2A;&#x529F;&#x80FD;&#x7684;&#x65F6;&#x5019;&#xFF0C;&#x6070;&#x6070;JsoupXpath&#x6CA1;&#x6709;&#xFF0C;&#x4E5F;&#x8BB8;SipSoup&#x5C31;&#x4F1A;&#x6709;&#x54E6;&#x3002;</p>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="3pa-chong-kong-zhi.html" class="navigation navigation-prev " aria-label="Previous page: 3.爬虫控制">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="4chou-qu-qi/41sipsoup.html" class="navigation navigation-next " aria-label="Next page: 4.1SipSoup">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"4.抽取器","level":"1.5","depth":1,"next":{"title":"4.1SipSoup","level":"1.5.1","depth":2,"path":"4chou-qu-qi/41sipsoup.md","ref":"4chou-qu-qi/41sipsoup.md","articles":[]},"previous":{"title":"3.爬虫控制","level":"1.4","depth":1,"path":"3pa-chong-kong-zhi.md","ref":"3pa-chong-kong-zhi.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":[],"pluginsConfig":{"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"4chou-qu-qi.md","mtime":"2017-06-24T15:11:20.000Z","type":"markdown"},"gitbook":{"version":"3.2.2","time":"2017-06-25T14:04:12.299Z"},"basePath":".","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="gitbook/gitbook.js"></script>
    <script src="gitbook/theme.js"></script>
    
        
        <script src="gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

